package com.zwps.biz.controller.http;


import com.zwps.biz.api.model.vo.reservoirInfo.ReservoirInfoVo;
import com.zwps.biz.dal.db.object.ReservoirInfoDO;
import com.zwps.biz.domain.service.ReservoirInfoService;
import com.zwps.common.controller.response.message.ResponseDataMessage;
import com.zwps.common.controller.response.message.ResponseMessage;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;

/**
 * @author dzc
 * @date 2024/9/18 19:59
 * @description
 */

@RestController
@Validated
@RequestMapping("brief/reservoir")
public class ReservoirInfoController {

    @Autowired
    private ReservoirInfoService reservoirInfoService;


    @Tag(name = "工程概况")
    @Operation(summary = "查询水库概况")
    @GetMapping("{rscd}")
    public ReservoirInfoVo getReservoirInfo(@Valid @NotBlank @PathVariable String rscd) {
        return  reservoirInfoService.getByStcd(rscd);
    }


    @Tag(name = "工程概况")
    @Operation(summary = "查询水库全景视频")
    @GetMapping("panorama/{rscd}")
    public String getVideoURL(@Valid @NotBlank @PathVariable String rscd) {
        return  reservoirInfoService.getVideoURL(rscd);
    }






}
